
public class Test2 {
    public static void main(String[] args) {
        //注释
        String str =  "Hello, my name is John";
        String[] tmp = str.split(" ");
        int ret = tmp.length;
        System.out.println(ret);
       /* for (int i = 0; i < tmp.length; i++) {
            System.out.println(tmp[i]);
        }*/
        //利用for each语句
        for (String x : tmp) {
            System.out.println(x);

            int[] numbers = { 43, 32, 53, 54, 75, 7, 10 };
            System.out.println("----for each----");
// for-each语句
            for (int item : numbers) {
                System.out.println("Count is:" + item);
            }
        }
    }
}
